<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="t3js-module-content" data-installer-database-connect-execute-token="{executeDatabaseConnectToken}">
	<div class="typo3-install-content-body">
		<h2>选择数据库</h2>
		<f:if condition="{hasAtLeastOneOption}">
			<f:then>
				<p>
					您需要创建具有相应权限的数据库用户才能访问您的数据库。
				</p>
				<div class="typo3-install-content-spacer"></div>
				<div class="t3js-installer-databaseConnect-output"></div>
				<div class="typo3-install-content-spacer"></div>
				<div class="row">
					<div class="col-md-12">
						<form method="post" class="form-horizontal">
							<div class="form-group">
								<label for="t3js-connect-database-driver" class="control-label col-md-2">连接</label>
								<div class="col-md-10">
									<select id="t3js-connect-database-driver" class="form-control" name="install[values][availableSet]">
										<f:if condition="{hasMysqliManualConfiguration}">
											<option
												value="mysqliManualConfiguration"
												{f:if(condition:'{activeAvailableOption} == mysqliManualConfiguration', then: 'selected="selected"')}
											>
											手动配置 MySQL TCP/IP 连接
											</option>
										</f:if>
										<f:if condition="{hasMysqliSocketManualConfiguration}">
											<option
												value="mysqliSocketManualConfiguration"
												{f:if(condition:'{activeAvailableOption} == mysqliSocketManualConfiguration', then: 'selected="selected"')}
											>
											手动配置的MySQL的套接字连接
											</option>
										</f:if>
										<f:if condition="{hasPostgresManualConfiguration}">
											<option
												value="postgresManualConfiguration"
												{f:if(condition:'{activeAvailableOption} == postgresManualConfiguration', then: 'selected="selected"')}
											>
											手动配置的PostgreSQL的连接
											</option>
										</f:if>
										<f:if condition="{hasSqliteManualConfiguration}">
											<option
												value="sqliteManualConfiguration"
												{f:if(condition:'{activeAvailableOption} == sqliteManualConfiguration', then: 'selected="selected"')}
											>
											手动配置的SQLite的连接
											</option>
										</f:if>
										<f:if condition="{hasConfigurationFromEnvironment}">
											<option
												value="configurationFromEnvironment"
												{f:if(condition:'{activeAvailableOption} == configurationFromEnvironment', then: 'selected="selected"')}
											>
											从环境变量配置
											</option>
										</f:if>
									</select>
								</div>
							</div>

							<f:if condition="{hasMysqliManualConfiguration}">
								<div id="mysqliManualConfiguration" class="t3-install-driver-data">
									<input type="hidden" value="mysqli" name="install[values][driver]"/>
									<div class="form-group">
										<label for="t3-install-step-mysqliManualConfiguration-username" class="control-label col-md-2">
											用户名
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliManualConfiguration-username"
												class="form-control"
												type="text"
												value="{mysqliManualConfigurationOptions.username}"
												name="install[values][username]"
												autocomplete="off"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-mysqliManualConfiguration-password" class="control-label col-md-2">
											密码
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliManualConfiguration-password"
												class="form-control"
												type="password"
												value="{mysqliManualConfigurationOptions.password}"
												name="install[values][password]"
												autocomplete="off"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-mysqliManualConfiguration-host" class="control-label col-md-2">
											主机
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliManualConfiguration-host"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{mysqliManualConfigurationOptions.host}"
												name="install[values][host]"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-mysqliManualConfiguration-port" class="control-label col-md-2">
											端口
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliManualConfiguration-port"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{mysqliManualConfigurationOptions.port}"
												name="install[values][port]"
											/>
										</div>
									</div>
								</div>
							</f:if>

							<f:if condition="{hasMysqliSocketManualConfiguration}">
								<div id="mysqliSocketManualConfiguration" class="t3-install-driver-data">
									<input type="hidden" value="mysqli" name="install[values][driver]"/>
									<div class="form-group">
										<label for="t3-install-step-mysqliSocketManualConfiguration-username" class="control-label col-md-2">
											用户名
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliSocketManualConfiguration-username"
												class="form-control"
												type="text"
												value="{mysqliSocketManualConfigurationOptions.username}"
												name="install[values][username]"
												autocomplete="off"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-mysqliSocketManualConfiguration-password" class="control-label col-md-2">
											密码
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliSocketManualConfiguration-password"
												class="form-control"
												type="password"
												value="{mysqliSocketManualConfigurationOptions.password}"
												name="install[values][password]"
												autocomplete="off"
											/>
										</div>
									</div>
									<input type="hidden" value="localhost" name="install[values][host]"/>
									<div class="form-group">
										<label for="t3-install-step-mysqliSocketManualConfiguration-socket" class="control-label col-md-2">
											套接字（socket）
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-mysqliSocketManualConfiguration-socket"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{mysqliSocketManualConfigurationOptions.socket}"
												name="install[values][socket]"
												placeholder="Default socket or enter name"
											/>
										</div>
									</div>
								</div>
							</f:if>

							<f:if condition="{hasPostgresManualConfiguration}">
								<div id="postgresManualConfiguration" class="t3-install-driver-data">
									<input type="hidden" value="pdo_pgsql" name="install[values][driver]"/>
									<div class="form-group">
										<label for="t3-install-step-postgresManualConfiguration-username" class="control-label col-md-2">
											用户名
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-postgresManualConfiguration-username"
												class="form-control"
												type="text"
												value="{postgresManualConfigurationOptions.username}"
												name="install[values][username]"
												autocomplete="off"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-postgresManualConfiguration-password" class="control-label col-md-2">
											密码
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-postgresManualConfiguration-password"
												class="form-control"
												type="password"
												value="{postgresManualConfigurationOptions.password}"
												name="install[values][password]"
												autocomplete="off"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-postgresManualConfiguration-database" class="control-label col-md-2">
											数据库
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-postgresManualConfiguration-database"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{postgresManualConfigurationOptions.database}"
												name="install[values][database]"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-postgresManualConfiguration-host" class="control-label col-md-2">
											主机
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-postgresManualConfiguration-host"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{postgresManualConfigurationOptions.host}"
												name="install[values][host]"
											/>
										</div>
									</div>
									<div class="form-group">
										<label for="t3-install-step-postgresManualConfiguration-port" class="control-label col-md-2">
											端口
										</label>
										<div class="col-md-10">
											<input
												id="t3-install-step-postgresManualConfiguration-port"
												class="t3-install-form-input-text form-control"
												type="text"
												value="{postgresManualConfigurationOptions.port}"
												name="install[values][port]"
											/>
										</div>
									</div>
								</div>
							</f:if>

							<f:if condition="{hasSqliteManualConfiguration}">
								<div id="sqliteManualConfiguration" class="t3-install-driver-data">
									<input type="hidden" value="pdo_sqlite" name="install[values][driver]"/>
								</div>
							</f:if>

							<f:if condition="{hasConfigurationFromEnvironment}">
								<div id="configurationFromEnvironment" class="t3-install-driver-data">
								</div>
							</f:if>

								<button class="btn btn-success pull-right t3js-installer-databaseConnect-execute">
									继续
								</button>
						</form>
					</div>
				</div>
			</f:then>

			<f:else>
				<div class="t3js-message typo3-message alert alert-danger" role="alert">
					<h4>找不到数据库驱动程序</h4>
					<p class="messageText">您没有安装或启用数据库驱动程序。请安装驱动程序以完成数据库连接。</p>
				</div>
			</f:else>
		</f:if>
	</div>
</div>
</html>
